﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [ExcelExporter(Name = "加油车")]
    [Table(Name = "jiayouche")]
    public class JiaYouChe
    {
        [IEIgnore(IsExportIgnore = true)]
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "bctid")]
        [JsonProperty("bctid")]
        [Description("保障车辆类型ID")]
        public long Bctid { get; set; }

        [ExporterHeader(DisplayName = "战区")]
        [Column(Name = "zq")]
        [JsonProperty("zq")]
        [Description("战区")]
        public string Zq { get; set; }

        [ExporterHeader(DisplayName = "军区")]
        [Column(Name = "Jq")]
        [JsonProperty("Jq")]
        [Description("军区")]
        public string Jq { get; set; }

        [ExporterHeader(DisplayName = "师区")]
        [Column(Name = "sq")]
        [JsonProperty("sq")]
        [Description("师区")]
        public string Sq { get; set; }

        [ExporterHeader(DisplayName = "团区")]
        [Column(Name = "tq")]
        [JsonProperty("tq")]
        [Description("团区")]
        public string Tq { get; set; }

        [ExporterHeader(DisplayName = "标准总序号")]
        [Column(Name = "bzzxh")]
        [JsonProperty("bzzxh")]
        [Description("标准总序号")]
        public string Bzzxh { get; set; }

        [ExporterHeader(DisplayName = "类型")]
        [Column(Name = "lx")]
        [JsonProperty("lx")]
        [Description("类型")]
        public string Lx { get; set; }

        [ExporterHeader(DisplayName = "专业")]
        [Column(Name = "zy")]
        [JsonProperty("zy")]
        [Description("专业")]
        public string Zy { get; set; }

        [ExporterHeader(DisplayName = "管理分工")]
        [Column(Name = "glfg")]
        [JsonProperty("glfg")]
        [Description("管理分工")]
        public string Glfg { get; set; }

        [ExporterHeader(DisplayName = "保障车辆唯一编码")]
        [Column(Name = "bzclwybm")]
        [JsonProperty("bzclwybm")]
        [Description("保障车辆唯一编码")]
        public string Bzclwybm { get; set; }

        [ExporterHeader(DisplayName = "车牌号")]
        [Column(Name = "cph")]
        [JsonProperty("cph")]
        [Description("车牌号")]
        public string Cph { get; set; }

        [ExporterHeader(DisplayName = "车辆名称")]
        [Column(Name = "clmc")]
        [JsonProperty("clmc")]
        [Description("车辆名称")]
        public string Clmc { get; set; }

        [ExporterHeader(DisplayName = "型号")]
        [Column(Name = "xh")]
        [JsonProperty("xh")]
        [Description("型号")]
        public string Xh { get; set; }

        [ExporterHeader(DisplayName = "使用时机")]
        [Column(Name = "sysj")]
        [JsonProperty("sysj")]
        [Description("使用时机")]
        public string Sysj { get; set; }

        [ExporterHeader(DisplayName = "功能用途")]
        [Column(Name = "gnyt")]
        [JsonProperty("gnyt")]
        [Description("功能用途")]
        public string Gnyt { get; set; }

        [ExporterHeader(DisplayName = "外形尺寸")]
        [Column(Name = "wxcc")]
        [JsonProperty("wxcc")]
        [Description("外形尺寸")]
        public string Wxcc { get; set; }

        [ExporterHeader(DisplayName = "计数单位")]
        [Column(Name = "jsdw")]
        [JsonProperty("jsdw")]
        [Description("计数单位")]
        public string Jsdw { get; set; }

        [ExporterHeader(DisplayName = "额定最大总质量")]
        [Column(Name = "edzdzzl")]
        [JsonProperty("edzdzzl")]
        [Description("额定最大总质量")]
        public string Edzdzzl { get; set; }

        [ExporterHeader(DisplayName = "整备质量")]
        [Column(Name = "zbzl")]
        [JsonProperty("zbzl")]
        [Description("整备质量")]
        public string Zbzl { get; set; }

        [ExporterHeader(DisplayName = "总运行时间")]
        [Column(Name = "zyxsj")]
        [JsonProperty("zyxsj")]
        [Description("总运行时间")]
        public string Zyxsj { get; set; }

        [ExporterHeader(DisplayName = "大修次数")]
        [Column(Name = "dxcs")]
        [JsonProperty("dxcs")]
        [Description("大修次数")]
        public string Dxcs { get; set; }

        [ExporterHeader(DisplayName = "中修次数")]
        [Column(Name = "zxcs")]
        [JsonProperty("zxcs")]
        [Description("中修次数")]
        public string Zxcs { get; set; }

        [ExporterHeader(DisplayName = "大、中修后保养次数")]
        [Column(Name = "dzxhbycs")]
        [JsonProperty("dzxhbycs")]
        [Description("大、中修后保养次数")]
        public string Dzxhbycs { get; set; }

        [ExporterHeader(DisplayName = "最近大修后运行时间")]
        [Column(Name = "zjdxhyxsj")]
        [JsonProperty("zjdxhyxsj")]
        [Description("最近大修后运行时间")]
        public string Zjdxhyxsj { get; set; }

        [ExporterHeader(DisplayName = "最近中修后运行时间")]
        [Column(Name = "zjzxhyxsj")]
        [JsonProperty("zjzxhyxsj")]
        [Description("最近中修后运行时间")]
        public string Zjzxhyxsj { get; set; }

        [ExporterHeader(DisplayName = "设备图像")]
        [Column(Name = "sbtx")]
        [JsonProperty("sbtx")]
        [Description("设备图像")]
        public string Sbtx { get; set; }

        [ExporterHeader(DisplayName = "生产厂家")]
        [Column(Name = "sccj")]
        [JsonProperty("sccj")]
        [Description("生产厂家")]
        public string Sccj { get; set; }

        [ExporterHeader(DisplayName = "出厂号码")]
        [Column(Name = "cchm")]
        [JsonProperty("cchm")]
        [Description("出厂号码")]
        public string Cchm { get; set; }

        [ExporterHeader(DisplayName = "出厂日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "ccrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("ccrq")]
        [Description("出厂日期")]
        public DateTime Ccrq { get; set; }

        [ExporterHeader(DisplayName = "接装日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "jzrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("jzrq")]
        [Description("接装日期")]
        public DateTime Jzrq { get; set; }

        [ExporterHeader(DisplayName = "接装验收人")]
        [Column(Name = "jzysr")]
        [JsonProperty("jzysr")]
        [Description("接装验收人")]
        public string Jzysr { get; set; }

        [ExporterHeader(DisplayName = "保管使用维护人")]
        [Column(Name = "bgsywhr")]
        [JsonProperty("bgsywhr")]
        [Description("保管使用维护人")]
        public string Bgsywhr { get; set; }

        [ExporterHeader(DisplayName = "调配类型")]
        [Column(Name = "dplx")]
        [JsonProperty("dplx")]
        [Description("调配类型")]
        public string Dplx { get; set; }

        [ExporterHeader(DisplayName = "调配日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "dprq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("dprq")]
        [Description("调配日期")]
        public DateTime Dprq { get; set; }

        [ExporterHeader(DisplayName = "调配依据")]
        [Column(Name = "dpyj")]
        [JsonProperty("dpyj")]
        [Description("调配依据")]
        public string Dpyj { get; set; }

        [ExporterHeader(DisplayName = "调配说明")]
        [Column(Name = "dpsm")]
        [JsonProperty("dpsm")]
        [Description("调配说明")]
        public string Dpsm { get; set; }

        [ExporterHeader(DisplayName = "平均年度使用频率")]
        [Column(Name = "pjndsypl")]
        [JsonProperty("pjndsypl")]
        [Description("平均年度使用频率")]
        public string Pjndsypl { get; set; }

        [ExporterHeader(DisplayName = "采购单价")]
        [Column(Name = "cgdj")]
        [JsonProperty("cgdj")]
        [Description("采购单价")]
        public string Cgdj { get; set; }

        [ExporterHeader(DisplayName = "寿命")]
        [Column(Name = "sm")]
        [JsonProperty("sm")]
        [Description("寿命")]
        public string Sm { get; set; }

        [ExporterHeader(DisplayName = "技术资料")]
        [Column(Name = "jszl")]
        [JsonProperty("jszl")]
        [Description("技术资料")]
        public string Jszl { get; set; }

        [ExporterHeader(DisplayName = "技术资料位置")]
        [Column(Name = "jszlwz")]
        [JsonProperty("jszlwz")]
        [Description("技术资料位置")]
        public string Jszlwz { get; set; }

        [ExporterHeader(DisplayName = "是否质保期内")]
        [Column(Name = "sfzbqn")]
        [JsonProperty("sfzbqn")]
        [Description("是否质保期内")]
        public string Sfzbqn { get; set; }

        [ExporterHeader(DisplayName = "质保期")]
        [Column(Name = "zbq")]
        [JsonProperty("zbq")]
        [Description("质保期")]
        public string Zbq { get; set; }

        [ExporterHeader(DisplayName = "质保期起算日期", Format = "yyyy-mm-DD hh:mm:ss")]
        [Column(Name = "zbqqsrq", DbType = "datetime(0) NOT NULL")]
        [JsonProperty("zbqqsrq")]
        [Description("质保期起算日期")]
        public DateTime Zbqqsrq { get; set; }

        [ExporterHeader(DisplayName = "备注")]
        [Column(Name = "bz")]
        [JsonProperty("bz")]
        [Description("备注")]
        public string Bz { get; set; }

        #region 需要从传感器传过来的字段

        //[Column(Name = "dpzt")]
        //[JsonProperty("dpzt")]
        //[Description("底盘状态")]
        //public string Dpzt { get; set; }

        //[Column(Name = "fdjzt")]
        //[JsonProperty("fdjzt")]
        //[Description("发动机状态")]
        //public string Fdjzt { get; set; }

        //[Column(Name = "xdcdy")]
        //[JsonProperty("xdcdy")]
        //[Description("蓄电池电压")]
        //public string Xdcdy { get; set; }

        //[Column(Name = "yxyl")]
        //[JsonProperty("yxyl")]
        //[Description("油箱油量")]
        //public string Yxyl { get; set; }

        //[Column(Name = "yh")]
        //[JsonProperty("yh")]
        //[Description("油耗")]
        //public string Yh { get; set; }

        //[Column(Name = "ltqy")]
        //[JsonProperty("ltqy")]
        //[Description("轮胎气压")]
        //public string Ltqy { get; set; }

        //[Column(Name = "sxwd")]
        //[JsonProperty("sxwd")]
        //[Description("水箱温度")]
        //public string Sxwd { get; set; }

        //[Column(Name = "hy")]
        //[JsonProperty("hy")]
        //[Description("滑油")]
        //public string Hy { get; set; }

        //[Column(Name = "xssd")]
        //[JsonProperty("xssd")]
        //[Description("行驶速度")]
        //public string Xssd { get; set; }

        //[Column(Name = "sczt")]
        //[JsonProperty("sczt")]
        //[Description("刹车状态")]
        //public string Sczt { get; set; }

        //[Column(Name = "zxwz")]
        //[JsonProperty("zxwz")]
        //[Description("最新位置")]
        //public string Zxwz { get; set; }

        //[Column(Name = "ygyl")]
        //[JsonProperty("ygyl")]
        //[Description("油罐油量")]
        //public string Ygyl { get; set; }

        #endregion

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [IEIgnore(IsExportIgnore = true)]
        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
